#ifndef __FACTORY_H__
#define __FACTORY_H__
#include "head.h"
#include "trans_file.h"
#include "database_op.h"
int upload(int fd_up, char* file_name,off_t off);
int download(int fd_down, char* file_name);
int factory_init(Factory_t *pf,int thread_num,int capacity);
int factory_start(Factory_t *pf,int thread_num);
void cleanup(void *p);
void* thread_handle(void *p);
void finish_task(pNode_t pN,train_off_t* poff_train,train_state_t* pt);
#endif